package cn.yunhe.user.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.yunhe.entity.User;
import cn.yunhe.entity.UserExample;
import cn.yunhe.mapper.UserMapper;
import cn.yunhe.user.service.UserService;

@Service
public class UserServiceImpl implements UserService{
	@Autowired
	private UserMapper userMapper;
	
	public List<User> selectUserByNamePassword(String name,String password){
		UserExample userExample = new UserExample();
		userExample.createCriteria().andUsernameEqualTo(name).andPasswordEqualTo(password);
		List<User> userList = userMapper.selectByExample(userExample);
		
		
		return userList;
	}
}
